<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>邀请记录 - Remote MySQL</title>
        <link rel="stylesheet" type="text/css" href="{$Think.__APP_PUBLIC__}/css/reset.css">
        <link rel="stylesheet" type="text/css" href="{$Think.__APP_PUBLIC__}/css/public.css">
		<link rel="stylesheet" type="text/css" href="{$Think.__APP_PUBLIC__}/css/{$Think.MODULE_NAME}/invite_record_list.css">
        <script language="javascript" type="text/javascript" src="{$Think.__APP_PUBLIC__}/js/jquery-1.8.2.js"></script>
		<script language="javascript" type="text/javascript" src="{$Think.__APP_PUBLIC__}/js/clipboard.js"></script>
        <script language="javascript" type="text/javascript" src="{$Think.__APP_PUBLIC__}/js/{$Think.MODULE_NAME}/invite_record_list.js"></script>
        <script language="javascript" type="text/javascript">
            var HOST_NAME = "{$Think.HOST_NAME}";
			var URL = "__URL__";
			var record_status = "{$_GET['record_status']}";
        </script>
    </head>

    <body>
        <include file="Base:head" />
        <div>
    		<fieldset>
                <legend align="center">&nbsp;邀请记录（全部） - Remote MySQL&nbsp;</legend>
				<div class="filter_area">
					<label for="record_status">按使用状态筛选：</label>
					<select id="record_status">
						<option value="all" selected="selected">全部</option>
						<option value="usable">未使用</option>
						<option value="used">已使用</option>
						<option value="unusable">已作废</option>
					</select>
				</div>
				<table class="rmt_table">
                    <tr class="title">
                        <td width="10%">昵称</td>
						<td width="52%">邀请链接</td>
						<td width="13%">邀请时间</td>
						<td width="10%">使用状态</td>
                        <td width="15%">操作</td>
                    </tr>
					<if condition="count($invite_record_list) eq 0">
					<tr>
						<td colspan="5" class="err_notice">暂无邀请记录</td>
					</tr>
					<else />
					<volist name="invite_record_list" id="vo">
                    <tr>
                        <td><span>{$vo['nickname']}</span></td>
						<td><span>{$vo['invite_link']}</span></td>
						<td><span>{$vo['invite_time']}</span></td>
						<td><span style="color: {$vo['status_color']}">{$vo['status_str']}</span></td>
                        <td>
							<if condition="$vo['status'] eq 1">
								<a href="__URL__/cancel_invite?record_id={$vo['id']}&record_status={$_GET['record_status']}" data-action-type="cancel_invite">取消邀请</a>
								<a href="javascript:void(0);" data-clipboard-text="{$vo['invite_link']}" class="copy">复制</a>
							<else />
								<a href="javascript:void(0);" class="disable">取消邀请</a>
								<a href="javascript:void(0);" class="disable">复制</a>
							</if>
						</td>
                    </tr>
                    </volist>
				</if>
                </table>
				<div class="pagelist_area">
					<include file="Base:pagelist" />
				</div>
				<div class="add_invite_area">
					<form method="post" action="__URL__/add_invite" onsubmit="return check_submit()" class="rmt_form">
						<label for="nickname">受邀人昵称：</label><input type="text" name="nickname" id="nickname" />
						<input type="submit" value="生成链接" id="make_invite_link" />
					</form>
				</div>
            </fieldset>
        </div>
    </body>
</html>
